package com.ayoka.parenting.ui.meditation.detail;

import android.support.v4.app.DialogFragment;

import com.ayoka.parenting.bean.BaseResponse;
import com.ayoka.parenting.bean.MeditationBean;
import com.ayoka.parenting.bean.MeditationDetailBean;
import com.ayoka.parenting.interf.RequestCallback;
import com.ayoka.parenting.mvp.BasePresenter;
import com.ayoka.parenting.mvp.BaseView;

/**
 * @ProjectName: MVPPlugin.
 * @ClassName: MeditationDetailContract.
 * @Description: .
 * @Author: jincp.
 * @CreateDate: 2019/10/10 18:17.
 */
public class MeditationDetailContract {

    interface View extends BaseView {
        void configMeditationDetailData(MeditationDetailBean data);

        void onDialogDismiss(DialogFragment dialog);

        void onSelectedMeditationAudio(MeditationBean.MeditationVoiceBean value);

        void onSelectedMeditationBackgroundMusic(MeditationDetailBean.BgMusicsBean value);

        void onChangeMeditationBackgroundVolume(float value);

        void onUpdateCompletedStatusCallback(boolean isSuccess);
    }

    interface Presenter extends BasePresenter<View> {
       void getMeditationDetailData(String meditationId);

        void updateCompletedStatus(String recordId, int playingDuration);
    }

    interface Model {
        void getMeditationDetailData(BasePresenter presenter, String meditationId, RequestCallback<MeditationDetailBean> requestCallback);

        void updateCompletedStatus(BasePresenter presenter, String recordId, int playingDuration, RequestCallback<BaseResponse> callback);
    }
}
